<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function he(){
            alert('hello');
            // 销毁定时器
            // 定时器调用，必须进行销毁
            clearTimeout(tid);
        }
        var tid=setTimeout(he,1000)
        setInterval(() => {
           alert('1') 
        }, 3000);

    </script>
</head>
<body>
    
</body>
</html>